package com.evil.application.api;

import com.evil.application.config.ApplicationFeignErrorDecoder;
import com.evil.application.pojo.dto.view.ApplicationViewReqDTO;
import com.evil.application.pojo.dto.view.ApplicationViewRespDTO;
import com.evil.application.pojo.dto.view.ModifyApplicationViewReqDTO;
import com.evil.common.family.constant.ServiceNameConstant;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

/**
 * 应用视图接口
 *
 * @author liyang
 * @date 2022-08-08 00:00
 */
@FeignClient(name = ServiceNameConstant.APPLICATION_SERVICE, configuration = {ApplicationFeignErrorDecoder.class})
public interface RemoteApplicationViewService {

    /**
     * 应用视图详情
     *
     * @param applicationViewReqDTO applicationViewReqDTO
     * @return Map
     */
    @PostMapping("/remote/application/view/info")
    ApplicationViewRespDTO viewInfo(@Validated @RequestBody ApplicationViewReqDTO applicationViewReqDTO);

    /**
     * 编辑应用视图
     *
     * @param modifyApplicationViewReqDTO modifyApplicationViewReqDTO
     */
    @PostMapping("/remote/application/view/modify")
    void modify(@Validated @RequestBody ModifyApplicationViewReqDTO modifyApplicationViewReqDTO);
}
